home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 April / macformat-023.iso / Shareware City / Comms / httpd-1-0a folder / About httpd next >
Encoding:
Text File  |  1994-12-15  |  9.2 KB  |  200 lines  |  [TEXT/ttxt]

  1. Thank you for downloading the ALPHA version of httpd.
  2.  
  3. WARRANTY
  4.  
  5. This program is supplied free with absolutely no warranty and may do unthinkable damage
  6. to your machine or data, for which I will accept no liability. Having said that, I didn't write
  7. it to do that, but you must satisfy yourself it will not do any damage before using it.
  8.  
  9. ABOUT HTTPD
  10.  
  11. httpd is an fba (Faceless Background Application) that implementsa minimal http server.
  12.  
  13. It is curently in ALPHA version. That means it is an early release, possibly full of bugs.
  14. It currently only supports the GET method, with full or simple requests. It also completely 
  15. ignores accept fields from the client and blindly spews out the files requested, without
  16. any header information.
  17.  
  18. WHAT DOES THAT MEAN ?
  19.  
  20. That means it should just work. It could be a lot better though and there will be some 
  21. improvements for the BETA version. You should be able to write pages with images, and 
  22. have separate image, sound and movie files. It will probably all work. It has worked for me.
  23.  
  24. I have tried using MacWeb and X-Mosaic and X-Netscape to retreive pages. However due to the
  25. lack of MIME support, it is possible you may find clients that do not work with the 
  26. ALPHA version. I guess the ones I have tried make some assumptions about the file they requested.
  27.  
  28. WHY HTTPD ?
  29.  
  30. There is one other http server I know of for the Mac which is not free. The aim of httpd is
  31. to provide a free httpd server, which implements enough to serve out pages on your mac,
  32. without it putting an enormous load on the machine. It is designed to be lightweight
  33. and fast.
  34.  
  35. It may not be much good if you expect to have loads of pages and images, or if you want to
  36. do more than just serve out static pages of HTML. At this stage I do not know how many pages
  37. and what sort of load it can reasonably handle. Perhaps someone could tell me how it fares.
  38.  
  39. RUNNING IT
  40.  
  41. Just launch it. It will look for its config/prefs file firstly in its own folder, then in the 
  42. prefs folder. If it does not find it, it creates it own from default resource info and quits.
  43. This prefs file can be edited to set up httpd how you want. You will find this prefs file in
  44. the preferences folder (within System folder) You can place this prefs files in the same folder
  45. as httpd or leave it in the prefs folder. (See next section) Now re-launch.
  46.  
  47. Use a text editor to edit the prefs file. There are comments within it to help you. It
  48. would probably help if you knew a bit about servers, http etc, but the sample prefs will work
  49. so if you know nothing except how to write WWW pages then you could just re-launch. Apologies
  50. for the fact that a lot of the configuration options don't work yet. Sometimes I call the prefs
  51. file a config file, but I'll try to acoid that from now on.
  52.  
  53. MULTIPLE INSTANCES
  54.  
  55. Just copy httpd for each 'server' you wish to run. Place the copies in separate folders and 
  56. create separate prefs files, also placing these in the folders. Set them up to run on different
  57. TCP ports and then launch them all. Make sure you set them up to serve on different TCP ports
  58.  
  59. Although it will not detect multiple servers on the same port and will appear to run fine,
  60. you may get some unexpected results.
  61.  
  62. WWW FILES
  63.  
  64. httpd can potentially serve any file in the same folder as the app. This is the same if you 
  65. launch it by means of an alias (Say by putting an alias in the startup items folder). If the URL
  66. '/' is requested (ie 'http://host.name/') httpd looks for the file 'home.html'
  67.  
  68. '/' delimiters in the URL indicate sub-dirs in the usual manner (even though the specs say 
  69. the use of the same delimter as is used for UNIX directories is co-incidence)
  70.  
  71. You can happily use the '.' and '..' format for relative URLs, well, with the clients 
  72. I tried anyway. You cannot (yet) put folder aliases in the app folder to serve out files from
  73. elsewhere. All httpd understands at the moment is normal folders and files. It does not
  74. distinguish between text, sound, or image files, or by file type or creator, or suffix.
  75.  
  76. Make sure of course that sound/image files you serve out match what the client expects, the
  77. stadard format seems to be Sun ULaw sounds format and GIF image format.
  78.  
  79. HOW DO I WRITE WWW PAGES
  80.  
  81. If you don't know I'm not going to explain it here. There are places you can find out though.
  82. I would suggest looking in CERN's WWW pages as that is where it all started. Alternatively
  83. try NCSA (http://info.cern.ch/ or http://www.ncsa.uiuc.edu/)
  84.  
  85. WWW pages are actually just text file written in a language called HTML, and include pointers
  86. to the image and sounds files etc. These files can be local to the machine or served out from 
  87. a remote machine. Some client programs like MacWeb, come with local files written in HTML
  88. explaining how to set it up. These are often set up as the home page as default. You'll
  89. get an idea simply by looking at those with a text editor.
  90.  
  91. POSSIBLE IMPROVEMENTS FOR A BETA RELEASE
  92.  
  93. - Write code to generate object headers
  94. - Code for reading in MIME type info
  95. - Understand client accept fields and act on them, maybe
  96. - dnr code
  97. - Access logging
  98. - Error logging
  99. - Code in many more debug messages for debug file
  100. - Handle debug buffer command in prefs file
  101. - Prevent serving out of logs and prefs file etc, perhaps by an exclude creator ?
  102. - Do prefs file syntax check
  103. - disintegrated cache (each element is bigger than the last by 2, starting with a small one)
  104.   (I know what this means even if you don't)
  105.  
  106. FUTURE VERSIONS MAY ALSO.....
  107.  
  108. - Allow remote changing of configuration by Program Linking. Also a restart option so that
  109.   the program is effectively restarted, should the configuration changes be made.
  110.  
  111. - Be able to resolve aliases, including guest account remote volumes, allowing users with
  112.   sys 7 to create and publish pages, using file sharing and guest login.
  113.  
  114. WHAT IT MAY NEVER DO.... (Depends if I can be bothered)
  115.  
  116. - Support Applescript or anything that might be needed for interactive pages ie
  117.   Search Functions
  118.  
  119. - Support additional methods.(eg POST for fill out forms)
  120.  
  121. MEMORY PARTITION
  122.  
  123. The partition is set at 200K minimum, 500K ideal. In fact httpd *may* run in a partition
  124. of ~150K + size of largest file expected to be served out by httpd. ie If you have a 
  125. 100K image file that can be accessed, then the partition should be at least 250K. Due
  126. to heap fragmentation caused during the running of the app, it is safer to run with 
  127. 150K + (2 * sizeof (largest file)). Heap fragmentation is increased if 'debug-info-to-
  128. file' option is on. (See sample prefs file)
  129.  
  130. Heap fragmentation should not cause too many problems, except for slowing it down. It has
  131. to be said though if it does crash at all, I would expect the problems to be with the 
  132. memory management.
  133.  
  134. BUGS
  135.  
  136. None known yet :-)
  137.  
  138. UNEXPECTED FEATURES
  139.  
  140. 1. Make sure the multifinder partition is big enough (see memory above). Because httpd 
  141. caches object retreived it need a certain amount of memory to do that. Objects cannot be
  142. cached in bits they have to be cached whole. This is why the size of the biggest object that
  143. be served out comes into the equation for determining the memory partition. This may be 
  144. fixed in the future, although its not that bit about disintegrated cache.
  145.  
  146. 2. Note point about heap fragmentation above. Later versions will have code to flush out 
  147. cache entries more than an hour or so old, which may allow the whole cache to be cleared during
  148. quiet periods. Fragmentation is due to cached objects and debug info to file options.
  149.  
  150. 3. At present there is nothing to stop you reuqesting the debug info or prefs file. Such action 
  151. could have some very weird if not dangerous results, I would not recommend it.
  152.  
  153. 4. Error handling seems a bit dodgy at the moment, expect odd behaviour, possible crashes if you 
  154. issue bad requests etc
  155.  
  156. ABOUT THE CODE DEVELOPMENT
  157.  
  158. This is my first TCP programme. It was developed on Think C v6. I made use of some 
  159. utilities, which you also find useful if you have any problems
  160.  
  161. MacsBug        - Apples low level debugger
  162. ZapTCP         - Apple extension, helps when TCP apps crash unexpectedely
  163. MacTCPwatcher  - Utility from Peter Lewis for testing MacTCP functions
  164. ZoneRanger     - Utility from Joshua Golub, used for examing memory
  165. ProcessFinder  - Utility from Edward Harp, used to kill the background app without rebooting
  166.  
  167. I will release the source code for this app later, when I have had a chance to tidy it
  168. up a bit.
  169.  
  170. It was developed on a Mac IIci, running Sys 7.1, MacTCP 2.0.4, with 20Meg of RAM. You 
  171. won't need that much though. It will not run on a 68000 machine. It does not use any 
  172. floating point code. It has also been run (although not for very long) on a Centris
  173. 610, again Sysy 7.1, MacTCP 2.0.4
  174.  
  175. COMMENTS
  176.  
  177. httpd is my first piece of shareware and I would be pleased to know it is being used at all. 
  178. Please send me any comments you have. Of course useful comments that would lead to bug fixing
  179. would be appreciated. I always read my E-Mail and I usually reply. You can always send me 
  180. a postcard. However if I get loads of E-Mail, I may not be able to reply. It may be better
  181. to post on USENet. I often read comp.sys.mac.comm, plus c.s.m.programmer and sometimes post.
  182.  
  183. I rarely read newsgroups about WWW
  184.  
  185. Bill Melotti
  186. Rm2.09, R68
  187. Rutherford Appleton Laboratory
  188. Chilton, Nr Didcot
  189. OXON
  190. OX11  OQX
  191. UNITED KINGDOM
  192. --------------------------------
  193.  
  194. Bill Melotti XMas 1994
  195.  
  196.  
  197. bill.melotti@rl.ac.uk
  198.  
  199.  
  200. -- End of file --